//
//  Texture.h
//  Sinnca Engine v2
//
//  Created by Ryan Oldis on 8/18/11.
//  Copyright 2011 Sinnca Studios. All rights reserved.
//

#ifndef Sinnca_Engine_v2_Texture_h
#define Sinnca_Engine_v2_Texture_h

#include "global.h"

class texture
{
	
	GLuint data;
	
	int w, h;
	int noOfColors;
	GLenum textureFormat;
	
	std::string name, filename;
	
public:
	
	texture(std::string n);
	
	void load(std::string file);
	virtual void bind();
	
	~texture();
};

texture* checkTexture(lua_State* L, int ind);

static int l_newTexture(lua_State* L);
static int l_load(lua_State* L);

void registerTexture(lua_State* L);

#endif
